Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to persist theme selection (49) #942

Merged

Conversation

YoussefHenna
Copy link
Collaborator

@YoussefHenna YoussefHenna commented Aug 25, 2024

🚀 This description was created by Ellipsis for commit 4615627

Summary:

This PR adds theme persistence using AsyncStorage in the Provider component and updates jest setup for testing.

Key points:

  • Adds theme persistence using AsyncStorage in the Provider component.
  • Updates jest setup for testing.
  • Adds @react-native-async-storage/async-storage to packages/theme/package.json.
  • Introduces SAVED_SELECTED_THEME_KEY in packages/theme/src/Provider.tsx.
  • Modifies changeTheme in Provider to use AsyncStorage for theme persistence.
  • Adds React.useEffect in Provider to load saved theme on init.
  • Updates useChangeTheme hook to support ChangeThemeOptions.
  • Adds jest mocks for AsyncStorage in packages/core/jest-setup.js and packages/maps/jest-setup.js.

Generated with ❤️ by ellipsis.dev

@YoussefHenna YoussefHenna added the legacy For a legacy branch using an older Expo version label Aug 25, 2024
Copy link

linear bot commented Aug 25, 2024

Copy link

Published version: @draftbit/ui@49.6.8-f99c50.2

@YoussefHenna YoussefHenna merged commit d2e8fba into 49 Aug 26, 2024
1 check passed
@YoussefHenna YoussefHenna deleted the youssef/p-5355-add-a-way-to-persist-theme-selection49 branch August 26, 2024 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy For a legacy branch using an older Expo version
Development

Successfully merging this pull request may close these issues.

1 participant